<template>
  <div>
    <p class="list-header">评论回复：</p>
    <ul class="list-group" v-for="(comment, index) in comments" :key="index">
      <li class="list-group-item">
        <Item :comment="comment" @deleteItem="deleteItem(index)"/>
      </li>
    </ul>
  </div>
</template>

<script>
import Item from './Item'
export default {
  components: {
    Item
  },
  props: {
    comments: Array
  },
  data () {
    return {

    }
  },
  methods: {
    deleteItem (index) {
      this.$emit('deleteItem', index)
    }
  }
}
</script>

<style>
.list-header {
  font-size: 30px;
}
</style>
